package com.wbihua.common.metrics.factory;

import com.wbihua.common.metrics.config.MeterConfig;
import com.wbihua.common.metrics.manager.MetricManager;

import java.util.ServiceLoader;
import java.util.stream.StreamSupport;

public interface MetricFactory {

    MetricFactory INSTANCE = StreamSupport.stream(ServiceLoader.load(MetricFactory.class).spliterator(), false).findFirst().orElse(null);


    MetricFactory initFactory(MeterConfig config);

    MetricManager getMetricManager();
}
